<?php

namespace app\api\controller;

use app\api\service\OrderService;
use app\BaseController;
use think\facade\Request;
use app\Response;

class Order extends BaseController
{
    public function orderEdit(){
        if(Request::method() == 'POST'){
            $uid = Request::param("uid");
            $post_num = Request::param("post_num");
            $state = Request::param("state");//
            $res = OrderService::orderEditService($uid,$post_num,$state);
            return $res;
        }
    }

    public function orderAdd(){
        if(Request::method() == 'POST'){
            $uid = Request::param("uid");
            $post_num = Request::param("post_num");
            $a_id = Request::param("a_id");
            $res = OrderService::orderAddService($uid,$post_num,$a_id);
            return $res;
        }
    }


    public function addressList(){
        if(Request::method() == 'POST') {
            $m_uid = Request::param("uid");
            $province = Request::param("province");
            $city = Request::param("city");
            $area = Request::param("area");
            $street = Request::param("street");
            $res = OrderService::addressListService($m_uid,$province,$city,$area,$street);
            return $res;
        }
    }
}